﻿using Firestarter.DB.Schema.BO;
using FireStarterModeller.Test;
using Habanero.Testability;

namespace Firestarter.DB.Schema.Test.BO.TestUtils
{
    public class TestUtilsDBForeignKeyColumn
    {


        public static BOTestFactory<DBForeignKeyColumn> GetTestFactory()
        {
            return BOTestFactoryRegistry.Instance.Resolve<DBForeignKeyColumn>();
        }
        /// <summary>
        /// Creates a new saved DBForeignKeyColumn with a random value assigned to every property
        /// </summary>
        public static DBForeignKeyColumn CreateSavedDBForeignKeyColumn()
        {
            DBForeignKeyColumn dBForeignKeyColumn = CreateUnsavedValidDBForeignKeyColumn();
            dBForeignKeyColumn.Save();
            return dBForeignKeyColumn;
        }

        /// <summary>
        /// Creates a new unsaved DBForeignKeyColumn with a random value assigned to every property
        /// </summary>
        public static DBForeignKeyColumn CreateUnsavedValidDBForeignKeyColumn()
        {
            DBForeignKeyColumn dBForeignKeyColumn = new DBForeignKeyColumn();
            dBForeignKeyColumn.ForeignKeyID = TestUtilsDBForeignKey.CreateSavedDBForeignKey().ForeignKeyID;
            dBForeignKeyColumn.ParentColumnID = TestUtilsDBColumn.CreateSavedDBColumn().ColumnID;
            dBForeignKeyColumn.RelatedColumnID = TestUtilsDBColumn.CreateSavedDBColumn().ColumnID;
//			dBForeignKeyColumn.PendingChangeType = null;
            dBForeignKeyColumn.Approved = TestUtilsShared.GetRandomBoolean();
            return dBForeignKeyColumn;
        }
	    
        /// <summary>
        /// Creates a new unsaved DBForeignKeyColumn where all properties are null, except ID properties
        /// and those with default values.  If there are compulsory properties without
        /// defaults, saving the object will throw an exception.
        /// </summary>
        public static DBForeignKeyColumn CreateUnsavedDefaultDBForeignKeyColumn()
        {
            DBForeignKeyColumn dBForeignKeyColumn = new DBForeignKeyColumn();
            return dBForeignKeyColumn;
        }
    }
}